package com.merge.task;

import com.merge.enums.TaskStatus;
import com.merge.pojo.Data;
import com.merge.queue.SliceQueue;

/**
 * 线程任务基类
 */
public abstract class Task implements Runnable {

    //任务ID
    private int id;

    //任务名称
    private String name;

    //任务状态
    protected int status = TaskStatus.RUN.getValue();

    public Task(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    public abstract void run();

}
